package com.gosophia.conferenceManagement.summary.test.integration;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.transaction.annotation.Transactional;

import com.gosophia.commons.exception.BusinessException;
import com.gosophia.conferenceManagement.common.entity.Document;
import com.gosophia.conferenceManagement.summary.entity.SummaryJobData;
import com.gosophia.conferenceManagement.summary.service.SummaryService;
import com.gosophia.taskManagement.entity.Job;
import com.gosophia.userManagement.entity.UserInfo;

@ContextConfiguration(locations = { "classpath*:moduleContext.xml",
		"classpath:applicationContext-it.xml"})
@Transactional(rollbackFor = { BusinessException.class })
public class ITSummaryServiceImpl extends
AbstractTransactionalJUnit4SpringContextTests{

    @Autowired
    private SummaryService summaryService;
    @Test
    public void test(){
    	
    }
    
//    @Test
//    public void testSaveOrUpdateSummaryJobData() throws BusinessException{
//        SummaryJobData summaryJobData = new SummaryJobData();
//        summaryJobData.setJobDataId(1L);
//        Job job = new Job();
//        job.setJobId(1L);
//        summaryJobData.setJob(job);
//        UserInfo userInfo = new UserInfo();
//        userInfo.setUserInfoId(1000L);
//        summaryJobData.setNextApproval(userInfo);
//        List<Document> list = new ArrayList<Document>();
//        Document d1= new Document();
//        d1.setDocumentName("aa");
//        d1.setDocumentPath("/web/app");
//        d1.setDocumentVersion("2");
//        list.add(d1);
//        Document doc = new Document();
//        doc.setDocumentName("在线文档");
//        doc.setDocumentPath("/web/online");
//        summaryService.saveOrUpdateSummaryJobData(summaryJobData, list,doc);
//    }
//    @Test
//    public void testSaveOrUpdateSummaryJobDataNewJobData() throws BusinessException{
//        SummaryJobData summaryJobData = new SummaryJobData();
//        Job job = new Job();
//        job.setJobId(3L);
//        job.setVersion(0L);
//        summaryJobData.setJob(job);
//        UserInfo userInfo = new UserInfo();
//        userInfo.setUserInfoId(1000L);
//        summaryJobData.setNextApproval(userInfo);
//        List<Document> list = new ArrayList<Document>();
//        Document d1= new Document();
//        d1.setDocumentName("222");
//        d1.setDocumentPath("/web/app");
//        d1.setDocumentVersion("2");
//        list.add(d1);
//        Document doc = new Document();
//        doc.setDocumentName("在线文档");
//        doc.setDocumentPath("/web/online");
//        summaryService.saveOrUpdateSummaryJobData(summaryJobData, list,doc);
//    }
}
